﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="AdminSchedule.aspx.cs" Inherits="MedicalCare.Admin.AdminSchedule" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Button ID="btnSave" runat="server" Text="批量保存" OnClick="btnSave_Click" />
    &nbsp;&nbsp;
    <asp:Button ID="btnDelete" runat="server" Text="批量删除" UseSubmitBehavior="true" OnClick="btnDelete_Click" />
    &nbsp;&nbsp;
    <asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" TargetControlID="btnDelete"
        ConfirmText="确定删除?" runat="server">
    </asp:ConfirmButtonExtender>
    <asp:Button ID="btnSetPerson" runat="server" Text="添加其他病人" OnClick="btnSetPerson_Click" />
    <asp:LinkButton ID="AdvanceSearch" Text="高级搜索" PostBackUrl="~/Admin/AdminScheduleSearch.aspx"
        runat="server"></asp:LinkButton>
    <table>
        <tr>
            <td>
                <asp:Calendar ID="CalendarSchedule" runat="server" UseAccessibleHeader="False" OnSelectionChanged="CalendarSchedule_SelectionChanged"
                    Width="220px" OnDayRender="CalendarSchedule_DayRender" OnVisibleMonthChanged="CalendarSchedule_VisibleMonthChanged">
                    <SelectedDayStyle BackColor="#0099FF" />
                </asp:Calendar>
                <asp:Button ID="btnShowNewSchedule" runat="server" Text="创建新日程" OnClick="btnShowNewSchedule_Click" />
            </td>
            <td>
                <asp:Panel ID="panelAddFamily" runat="server" Visible="false">
                    <asp:ListBox ID="Familylist" runat="server" Height="137px" Width="122px" SelectionMode="Multiple">
                    </asp:ListBox>
                    &nbsp;
                    <asp:Button ID="btnRefreshFamilyList" runat="server" Text="刷新" OnClick="btnRefreshFamilyList_Click" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnAddFamily" runat="server" OnClick="btnAddFamily_Click" Text="确认" />
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblLoopEndDay" runat="server">当前该日程循环至:</asp:Label>
                <asp:TextBox runat="server" Width="100px" ID="tbLoopEndDay" />
                <asp:CalendarExtender ID="calendarLoopEndDay" TargetControlID="tbLoopEndDay" runat="server"
                    TodaysDateFormat="yyyy年MM月" DaysModeTitleFormat="yyyy年MM月">
                </asp:CalendarExtender>
            </td>
        </tr>
        <tr>
            <td colspan="4">
                <asp:DataList ID="ScheduleList" runat="server" RepeatDirection="Horizontal" CellPadding="4"
                    RepeatColumns="2" OnItemCommand="ScheduleList_ItemCommand" BackColor="White"
                    BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" GridLines="Horizontal"
                    OnItemDataBound="ScheduleList_ItemDataBound" OnDataBinding="ScheduleList_DataBinding"
                    OnSelectedIndexChanged="ScheduleList_SelectedIndexChanged">
                    <FooterStyle BackColor="White" ForeColor="#333333" />
                    <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
                    <ItemStyle BackColor="White" ForeColor="#333333" />
                    <ItemTemplate>
                        <table cellpadding="2" cellspacing="1" border="0">
                            <tr>
                                <td>
                                    <asp:Label runat="server" ID="lbScheduleId" Text=' <%# DataBinder.Eval(Container.DataItem, "Id")%> '
                                        Visible="false" />
                                    <asp:Label runat="server" ID="lbFamilyId" Text=' <%# DataBinder.Eval(Container.DataItem, "FamilyId")%> '
                                        Visible="false" />
                                    <asp:Label runat="server" ID="lbStartDT" Text=' <%# DataBinder.Eval(Container.DataItem, "StartDT")%> '
                                        Visible="false" />
                                    <asp:Label runat="server" ID="lbEndDT" Text=' <%# DataBinder.Eval(Container.DataItem, "EndDT")%> '
                                        Visible="false" />
                                    <asp:Label runat="server" ID="lbNurseId" Text=' <%# DataBinder.Eval(Container.DataItem, "NurseId")%> '
                                        Visible="false" />
                                    <asp:Label runat="server" ID="lbStatus" Text=' <%# DataBinder.Eval(Container.DataItem, "Status")%> '
                                        Visible="false" />
                                    <table cellpadding="0" cellspacing="0" border="0">
                                        <tr>
                                            <td style="width: 120px; font-size: 15px; font-weight: bold; vertical-align: middle;">
                                                <asp:CheckBox ID="chbCare" Checked="true" runat="server" />
                                                <%# DataBinder.Eval(Container.DataItem, "FamilyName")%>
                                                <%--<asp:button runat="server" Text="移除" CommandName="Delete"  />--%>
                                            </td>
                                        </tr>
                                        <%--  <tr>
                                        <td >
                                            地点：<%# DataBinder.Eval(Container.DataItem, "Address")%></td>
                                        
                                    </tr>--%>
                                        <tr>
                                            <td>
                                                时间：
                                                <asp:DropDownList ID="ddlStartTime" DataTextField="Description" DataValueField="Value"
                                                    runat="server">
                                                </asp:DropDownList>
                                                -
                                                <asp:DropDownList ID="ddlEndTime" DataTextField="Description" DataValueField="Value"
                                                    runat="server">
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr id="FreqTableTr" runat="server">
                                            <td style="vertical-align: top;">
                                                <asp:Label ID="lblFreq" runat="server" Text="频率"></asp:Label>
                                                <asp:DropDownList ID="ddlFreqNumber" runat="server">
                                                    <asp:ListItem Text="1" Value="1"></asp:ListItem>
                                                    <asp:ListItem Text="2" Value="2"></asp:ListItem>
                                                    <asp:ListItem Text="3" Value="3"></asp:ListItem>
                                                    <asp:ListItem Text="4" Value="4"></asp:ListItem>
                                                    <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                                    <asp:ListItem Text="6" Value="6"></asp:ListItem>
                                                </asp:DropDownList>
                                                <asp:DropDownList ID="ddlFreqType" runat="server">
                                                    <asp:ListItem Text="天" Value="day"></asp:ListItem>
                                                    <asp:ListItem Text="周" Value="week"></asp:ListItem>
                                                    <asp:ListItem Text="月" Value="Month"></asp:ListItem>
                                                </asp:DropDownList>
                                                <asp:Label ID="lblFreqPer" runat="server" Text="次"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                护工：
                                                <asp:DropDownList ID="ddlNurse" DataTextField="Name" DataValueField="Id" runat="server">
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td>
                                    <table cellpadding="0" cellspacing="0" border="0" width="250px">
                                        <tr>
                                            <td colspan="2" style="vertical-align: top;">
                                                护理内容：
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" style="vertical-align: top;">
                                                <asp:TextBox ID="tbDetails" runat="server" Rows="5" ReadOnly="False" TextMode="MultiLine"
                                                    Text='<%# DataBinder.Eval(Container.DataItem, "Details")%>'></asp:TextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <%-- <tr>
                                    <td colspan="2" style=" text-align:left">
                                        <hr />
                                        </td>
                                    </tr>--%>
                        </table>
                    </ItemTemplate>
                    <SelectedItemStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
                </asp:DataList>
            </td>
        </tr>
    </table>
    <script type="text/javascript" src="../Scripts/jquery/jquery-1.4.1.min.js"></script>
    <script type="text/javascript">
    </script>
</asp:Content>
